/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#include "VertexBuffer.h"
#include <list>
#include <logs/Log.h>

namespace liba
{
namespace lib3d
{
namespace hard
{

#ifdef _DEBUG
	static std::list<VertexBuffer *> all_nodes;
#endif	
	
VertexBuffer::VertexBuffer()
{
#ifdef _DEBUG
	all_nodes.push_back(this);
#endif
}

VertexBuffer::~VertexBuffer()
{
#ifdef _DEBUG
	all_nodes.remove(this);
#endif
}

void VertexBuffer::report_usage()
{
#ifdef _DEBUG
	logs::log() << "total vertex buffers: " << (int)all_nodes.size() << "\n";
#endif
}
	
} // namespace hard
} // namespace lib3d
} // namespace liba

